#include "EventHandler.h"

void EventHandler::HandleEvent(const MSG& event)
{
	switch (event.message)
	{
	case WM_KEYDOWN:
		OnKeyDownEvent(event.wParam);
		break;

	case WM_KEYUP:
		OnKeyUpEvent(event.wParam);
		break;
		
	case WM_MOUSEMOVE:
		OnMouseMotionEvent(event.lParam);
		break;

	case WM_LBUTTONDOWN:
		OnMouseButtonDownEvent(event);
		break;

	case WM_RBUTTONDOWN:
		OnMouseButtonDownEvent(event);
		break;

	case WM_LBUTTONUP:
		OnMouseButtonUpEvent(event);
		break;

	case WM_RBUTTONUP:
		OnMouseButtonUpEvent(event);
		break;

	case WM_MOUSEWHEEL:
		OnMouseWheelEvent(event.wParam);
		break;

	case SDL_JOYAXISMOTION:
		OnJoystickEvent(event.lParam);
		break;
	}
}